import request from '@/utils/request'
import store from '@/store'

// 封装一个获取用户信息的接口
export const userInfo = () => {
  return request({
    url: '/au/info',
    headers: {
      authorization: 'Bearer ' + store.state.user.token
    }
  })
}

// 封装一个修改用户信息的接口
export const editUserInfo = () => {
  return request({
    url: '/au/edit',
    method: 'POST',
    headers: {
      authorization: 'Bearer ' + store.state.user.token
    }
  })
}

// 封装一个文件上传接口
export const fileUp = () => {
  return request({
    url: '/upload',
    method: 'POST',
    headers: {
      authorization: 'Bearer ' + store.state.user.token
    }
  })
}
